package com.whpost.api.controller.zhdt;

import cn.dev33.satoken.stp.StpUtil;
import com.whpost.api.controller.BaseController;
import com.whpost.api.utils.ApiUtils;
import com.whpost.service.entity.tools.ResultInfo;
import com.whpost.service.zhdt.service.ZhdtWdzbServices;
import com.whpost.service.zhdt.service.ZhdtWgxxServices;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@RestController
@RequestMapping("/zhdt/wdzb")
public class ZhdtWdzbController extends BaseController {

    @Resource
    private ZhdtWdzbServices zhdtWdzbServices;

    @Autowired
    public ZhdtWdzbController(ZhdtWdzbServices zhdtWdzbServices) {
        super();
        setPerCode("zhdtwdzb");
        setBaseServices(zhdtWdzbServices);
    }

    /**
     * 手工网点标注界面逻辑
     * @return
     */
    @RequestMapping(value ="/info1")
    public ResultInfo info1(@RequestBody Map<String, Object> map){
        StpUtil.checkPermission("zhdtwdzb:add");
        String loginId = ApiUtils.getLoginId();
        return zhdtWdzbServices.info1(loginId,map);
    }

    /**
     * 手工网点标注存盘逻辑
     * @return
     */
    @RequestMapping(value ="/save1")
    public ResultInfo save1(@RequestBody Map<String, Object> map){
        StpUtil.checkPermission("zhdtwdzb:add");
        String loginId = ApiUtils.getLoginId();
        return zhdtWdzbServices.save1(loginId,map);
    }
}
